﻿using System;

namespace Badge_Manager.Model
{
    public class Stanza
    {
        public Stanza()
        {
            Id = Guid.NewGuid();
        }

        public Guid Id { get; set; }

        public int Numero { get; set; }

        public int Capienza { get; set; }

        public override string ToString()
        {
            return Numero.ToString();
        }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (Object.ReferenceEquals(this, obj)) return true;
            Stanza stanza = obj as Stanza;
            if ((System.Object)stanza == null)
            {
                return false;
            }
            if (stanza.Capienza == this.Capienza && stanza.Numero == this.Numero)
            {
                return true;
            }
            return false;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}